-- GENERATED SPELL FOR [Trogma] --


function spell0_21640(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_21640', 662, 1)
end

function spell1_21640(pUnit, Event) --@Kick,n/a--
pUnit:FullCastSpellOnTarget(34802,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21640', 6317, 1)
end

function Sorts_21640(pUnit, Event)
local choix_sorts_21640 = math.random(0, 1)
if choix_sorts_21640 == 0 then
pUnit:RegisterEvent('spell0_21640', 1, 1)
end
if choix_sorts_21640 == 1 then
pUnit:RegisterEvent('spell1_21640', 1, 1)
end
end

function mob21640_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21640', math.random(1500, 3000), 1)
end

function mob21640_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21640_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21640_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21640, 1, 'mob21640_Action')
RegisterUnitEvent(21640, 2, 'mob21640_Leave')
RegisterUnitEvent(21640, 3, 'mob21640_Kill')
RegisterUnitEvent(21640, 4, 'mob21640_Die')
